#include "Solution.h"
#include <iostream>

int main()
{
	int n;
	cin>>n;

	vector<vector<string> > results = Solution().solveNQueens(n);
	cout<<results.size();
	while(cin.get() != '\n');
	cin.get();
}